home *** CD-ROM | disk | FTP | other *** search
/ Cocktail Hour / image.iso / COCKTAIL.DIR / drinks_91_spirits main script.ls < prev    next >
Encoding:
Text File  |  1997-03-05  |  1.4 KB  |  55 lines

  1. on exitFrame
  2.   global SoundActive, gProgrmPathOnHD, OnceCheck, StartingLine
  3.   if SoundActive and (soundBusy(1) = 0) then
  4.     sound playFile 1, gProgrmPathOnHD & "drinks"
  5.   end if
  6.   set StartingLine to 1
  7.   if OnceCheck = 0 then
  8.     cursor(-1)
  9.     set OnceCheck to 1
  10.     repeat with i = 3 to 10
  11.       set the cursor of sprite i to [34, 35]
  12.       puppetSprite(i, 1)
  13.     end repeat
  14.     repeat with i = 42 to 48
  15.       puppetSprite(i, 1)
  16.     end repeat
  17.   end if
  18.   repeat with i = 3 to 10
  19.     if the member of sprite i = "origin" = 0 then
  20.       if rollOver(i) = 0 then
  21.         set the member of sprite i to member "origin"
  22.       end if
  23.     end if
  24.   end repeat
  25.   go(the frame)
  26. end
  27.  
  28. on mouseDown
  29.   set bDown to the clickOn
  30.   if (bDown > 2) and (bDown < 11) then
  31.     set the member of sprite bDown to member ("spirit" & bDown - 2) of castLib "drinks"
  32.   else
  33.     if bDown > 41 then
  34.       buttonPressedDown(bDown, "spirits")
  35.     end if
  36.   end if
  37. end
  38.  
  39. on mouseUp
  40.   global currMarker
  41.   set bUp to the clickOn
  42.   set destName to the name of the member of sprite bUp
  43.   if (the clickOn > 2) and (the clickOn < 11) and (destName <> "origin") then
  44.     set x to the number of lines in field "backField"
  45.     put marker(0) into line x + 1 of field "backField"
  46.     clearPuppets()
  47.     set currMarker to destName
  48.     go(marker(destName))
  49.   else
  50.     if bUp > 41 then
  51.       buttonPressedUp(bUp, "spirits")
  52.     end if
  53.   end if
  54. end
  55.